home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Business Master (4th Edition)
/
The Business Master - 4th Edition.iso
/
files
/
utilreen
/
ezset
/
manual.doc
< prev
next >
Wrap
Text File
|
1992-04-24
|
27KB
|
587 lines
EZSET Version 2.0
+++++++
By McAdams Associates
*****************************************************************
**IMPORTANT**
To register EZSET, see "Registering EZSET" on page 9 of
this manual.
Contents Page
-------- ----
Description.............................. 2
Hardware Requirements.................... 2
EZSET's Limitations...................... 2
How EZSET Works.......................... 2
Using EZSET in Command Line Mode......... 3
Editing Strings.......................... 4
Entering a New String.................... 5
The Byte Input/Editing Screen............ 5
Troubleshooting.......................... 7
Disclaimer - Agreement................... 8
Registering EZSET........................ 9
Index.................................... 10
(C)Copyright 1992 by T.C. McAdams. All Rights Reserved.
EZSET DESCRIPTION
-----------------
EZSET is a utility program designed to make it easy to access ALL
of your parallel printer's features, whether directly available
from the printer's control panel or not. Unlike other methods,
which either involve programs that come with a predefined library
of printer codes (none of which usually match your printer), or
which involve writing BASIC programs or batch files, all you need
to use EZSET effectively is your printer's manual. EZSET is
designed to make it EASY to send your printer's control codes
from the command line or from inside batch files. In addition,
EZSET printer strings can be customized to go automatically to
any printer port, using any printer online return value.
HARDWARE REQUIREMENTS
---------------------
EZSET should work on any IBM-compatible computer, running DOS 2.1
or better.
EZSET'S LIMITATIONS
-------------------
EZSET will manage a printer string library containing an
arbitrary maximum of 255 printer strings, with each printer
string a maximum of 255 characters in length. EZSET will output
strings only through parallel ports 1 through 3. EZSET will not
output through serial ports.
HOW EZSET WORKS
---------------
EZSET has two modes, an editor mode and a command line mode. The
editor mode is used to input and edit printer strings. The
command line mode is used to send strings to a printer. Typing
EZSET [ENTER]
calls EZSET up in editor mode. Here is what you'll see:
Exit Program
Edit A Printer String
Enter A New Printer String
Above the menu choices there is a line telling you to use the
arrow keys to move the light bar and to press [ENTER] when your
choice is highlighted. To leave EZSET you would simply highlight
"Exit Program" and press the [ENTER] key. This style of menu is
EZSET's main method of getting input, making it difficult to go
wrong. Here is what the different main menu choices do:
2
Exit Program
------------
Leaves EZSET.
Edit A Printer String
---------------------
If there are already some strings defined (in a file called
EZSET.LIB), choosing this option gives you a chance to modify
them.
Enter A New Printer String
--------------------------
Choosing this option gives you an opportunity to enter a new
string, including determining which printer port the string will
go to, and defining what the online return code should be.
Both editing and entering a new string will be covered in detail
a little later on.
USING EZSET IN COMMAND LINE MODE
--------------------------------
After there has been at least one string entered, using EZSET's
editing mode, you can send it to your printer by typing
EZSET stringname [ENTER]
If the printer is online (as determined by the return code saved
with the string) the string is sent to it. If the printer is
off-line you are told so and EZSET exits with a return code of
255. EZSET's ability to return an exit code makes it possible to
do conditional branching in a batch file. An example batch file
could be something like this:
ECHO OFF
EZSET stringname
IF ERRORLEVEL 1 GOTO END
programname
:END
Notice that EZSET uses the highest possible ERRORLEVEL return
code. This means that "IF ERRORLEVEL 255 GOTO END" would work
equally well.
In addition to the return code, when a printer is offline a
message to that effect is printed to the screen. And, if you
type a nonexistent string name (one that isn't in the library
file), EZSET will say so, likewise with a return code.
EZSET is supplied with a sample library of printer strings for an
NEC Pinwriter printer. If you don't have a Pinwriter, feel free
to play with and experiment with them. When you've gotten
3
familiar with EZSET they can be erased by deleting the file
EZSET.LIB. Then you'll have a "fresh slate" for inputting your
own printer's strings.
EDITING STRINGS
---------------
From the main menu press the [DOWN ARROW] key once, to highlight
"Edit A Printer String", and press [ENTER]. In the center of the
screen you'll see a sorted list of all available printer strings.
Across the bottom of the screen are all of the pertinent control
keys. Notice that you can scroll the string list by using any of
the "vertical" cursor-movement keys ([UP ARROW], [DOWN ARROW],
[PgUp], [PgDn], [HOME] and [END]).
To the left of the list box is a status indicator showing what
the highlighted string's port setting is. Pressing [F9] will
take you to a light bar menu that lets you choose which printer
port a particular string should always go to. The port selected
from the "Edit A Printer String" menu applies ONLY to that
particular string. The same menu, reached from the "Enter A New
Printer String" main menu selection, will enable you to change
the present session's default port setting. All strings entered
after changing the default port will have that as their setting.
To the right of the list box is a status indicator showing what
the highlighted string's online code is. Before a string is sent
to a printer from the command line, EZSET "interrogates" the
printer to see if it's on and on line, to prevent your computer
from going into the dreaded "timeout". Truly, for most printers
the default value for this will be all that is necessary, so you
probably won't need to use this feature. But if you ever
encounter a "rogue printer" (as I have) that insists on
responding differently than others, it can be handy. Pressing
[F10] will take you to yet another light bar menu enabling you to
(1) interrogate the printer (with an informative bitwise readout
of the return code), (2) to return WITHOUT changing the set
value, (3) to return WITH a new value, and, finally, (4) to
restore the default value if you find you've chosen unwisely. An
online code selected here (from the edit menu) applies ONLY to
the highlighted string. Changing the default is possible from
the "Enter A New Printer String" menu.
Pressing [DELETE] inside the edit menu will erase the highlighted
string. Use [DELETE] cautiously; if you erase something you wish
hadn't you will have to exit to the main menu (by pressing [ESC])
and then leave the program (by pressing [ENTER]). When asked if
you want to save changes to disk, answer "no". Everything done
in the current session will then be gone.
To try out what effect a particular string has on your printer,
pressing [F5] will send it to the printer. It's often useful to
be able to enter a string, try it out, and then go back to the
editing screen to modify it on the spot, if necessary.
4
Pressing [ENTER] takes you to the byte editing screen, with the
currently highlighted string displayed for editing. The byte
editing screen will be described later, since it's where you go
from the "Enter A New Printer String" menu, as well as from this
one.
ENTERING A NEW STRING
---------------------
From the main menu press down [DOWN ARROW] key twice (or [UP
ARROW] once), to highlight "Enter A New Printer String", and
press [ENTER]. In the middle of the screen you will see a box
for entering a string name. Unlike DOS path- and file-names,
anything goes with a string name: letters, numbers and spaces are
all okay. Everything is automatically converted to uppercase as
it is entered.
To the left of the entry box, similar to the editing menu, is a
status indicator for the output port. Where the indicator said
"String Port Value" in the editing menu, however, it now says
"Current Port Value", indicating that the OVERALL, or DEFAULT
value can be changed from this menu. Pressing [F9] takes you to
a scroll menu where you select which printer port all
subsequently entered strings should go to.
To the right of the entry box is a status indicator for the
printer online value. Where, in the edit menu, it said, "String
Online Value", it now says "Current Online Value", indicating
that a change (by pressing [F10]) will change the default value,
affecting all subsequent (new) strings.
Pressing [ENTER] after entering a string name will take you to
the byte editing screen, where the individual bytes of a new
setup string can be entered.
THE BYTE INPUT/EDITING SCREEN
-----------------------------
Pressing [ENTER] from both the "Edit A Printer String" menu or
the "Enter A New Printer String" menu brings you here. Across
the middle of the screen is a display of string bytes, given in
the first row as decimal numbers, and in the second as
hexadecimal numbers. This makes it easier to enter and edit a
string, since a majority of printer manuals use both to
illustrate escape codes. Above the byte display are the byte
numbers. Below the display is an arrow, used as a cursor
indicating which byte we're operating on. On the bottom of the
screen is a list of applicable keys:
[ESC] Returns you to the previous menu.
[-><-] The left and right arrow keys move the arrow cursor
left and right within the string.
[PgUp] "Jumps" the cursor 15 bytes to the left, towards the
5
beginning of the string. Scrolls backward through
the string.
[PgDn] "Jumps" the cursor 15 bytes to the right, towards the
end of the string. Scrolls forward through the
string.
[HOME] Repositions the cursor to byte 0 of the string.
[END] Repositions the cursor to the first byte FOLLOWING
the end of the string. Used for appending new bytes
to the end of a string.
[INS] The insert key moves the bytes above and to the right
of the cursor one slot to the right, opening up a
space for inserting a new byte.
[DEL] Deletes the byte above the cursor.
Above the byte display are directions:
"Input the byte of the printer string indicated by the [UP ARROW]
using <C>haracters, <D>ecimal numbers, or <H>ex numbers, then
press [ENTER]. . ."
followed by a prompt. EZSET's ease of use comes partly through
its ability to accept a byte value as a character, decimal number
or hex number, all of which can be equivalent, depending on how
they are interpreted.
After entering a value and pressing [ENTER], EZSET says
"Is this a <C>haracter, <D>ecimal number or <H>ex number?"
at which point you must press "C", "D" or "H", to indicate how
what you've typed should be interpreted. A few examples:
To enter an escape code (ASCII character 27), DON'T press [ESC],
which will only return you to the previous menu. Instead, type
27 [ENTER]
D
You could equally well have typed
1b [ENTER]
H
since 27 decimal is THE SAME AS 1b hex, and EZSET has no trouble
keeping them straight if you tell it what the number base is ("D"
for decimal, in the first instance, "H" for hex in the second).
Entering literal string characters (as in the letter "A") is just
as easy. Just press "C" to indicate that this is a <C>haracter.
If you type a string more than 1 character long and tell EZSET
6
it's a character, only the FIRST BYTE of the input will be
interpreted as a character.
As each new byte is entered the decimal and hex values of that
byte will be displayed over the arrow cursor, which will then
move to the right, awaiting the next byte. As the number of
characters entered grows, the byte display will scroll to keep
up. You can move back and forth inside the string for editing,
at any time, using the cursor movement keys detailed above. When
you're through entering or editing your string, press [ESC].
TROUBLESHOOTING
---------------
Most of the time, looking up printer codes and inputting them to
EZSET will be a trouble-free operation. But what to do if the
results are not what you expect? This section suggests a method
for "cracking the tough nuts".
When you cannot make your printer behave as you wish, it may be
helpful to see how another program does it. This presupposes, of
course, that you have a word processor or the like that is able
to switch your printer in the desired fashion. The first step in
finding out how this other program works its magic is to capture
its output to a disk file, to PRINT TO DISK. Most word
processors and text editors are able to do this. If yours isn't,
it is still possible to capture print output to a disk file by
using one of the many shareware utilities available for the
purpose. Check with your local shareware disk distributor, or,
if you have a modem, log on to your favorite BBS and conduct a
keyword search using, for example, "PRINT TO DISK". That should
net some possibilities.
Once you are set up to print to disk, simplify your formatting as
much as you can: no top margin, no left margin, and so on. Then,
type "Hello!" and print this file to disk. Call the file HELLO.
The next step involves using DEBUG, a utility that comes with
DOS, to help you decipher what's going on. Here's what you do:
>DEBUG HELLO
-D
23CC:0100 1C 40 1B 36 1B 74 01 1B-43 00 0B 1B 6B 00 1B 78
23CC:0110 01 1B 50 1B 52 00 1B 4A-B4 48 65 6C 6C 6F 21 0D
23CC:0120 1B 4A FF 1B 4A FF 1B 4A-FF 1B 4A FF 1B 4A FF 1B
23CC:0130 4A FF 1B 4A FF 1B 4A 0F-1C 40 0D F9 EB 0A 50 B0
23CC:0140 03 B4 FF E8 03 00 58 F8-C3 57 26 8B 7F 04 2E 89
23CC:0150 3E C8 88 26 88 05 26 88-65 01 50 2E A1 D7 88 26
23CC:0160 89 45 02 58 3C 01 75 0A-26 89 55 04 26 89 4D 06
23CC:0170 EB 5A 3C 02 75 06 26 89-55 04 EB 50 3C 07 74 E8
To the right of this (which there isn't room to show here) you
would see a straight ASCII representation of the above. At
offset 119 hex there is our friendly "Hello!". Your own "hello"
file will certainly differ from this one; what you are interested
7
in is everything preceding the text. It's now time to call your
printer's manual into play again. Start at the beginning,
looking up each code in turn, and write down what it does. By
the time you get to the "Hello!" you should have a good idea of
exactly what steps are necessary to get what you want out of your
printer. Since EZSET accepts hexadecimal input, there is no need
to translate, and it should now be possible to get the results
you want.
DISCLAIMER - AGREEMENT
----------------------
Users of EZSET must accept this disclaimer of warranty:
"EZSET is supplied as is. The author disclaims all warranties,
expressed or implied, including, without limitation, the
warranties of merchantability and of fitness for any purpose.
The author assumes no liability for damages, direct or
consequential, which may result from the use of EZSET."
EZSET is a "shareware program" and is provided at no charge
to the user for evaluation. Feel free to share it with your
friends, but please do not give it away altered or as part of
another system. The essence of "user-supported" software is to
provide personal computer users with quality software without
high prices, and yet to provide incentive for programmers to
continue to develop new products. If you find this program
useful and find that you are using EZSET and continue to use
EZSET after a reasonable trial period, you must make a
registration payment of $20 to McAdams Associates. The $20
registration fee will license one copy for use on any one
computer at any one time. You must treat this software just like
a book. An example is that this software may be used by any
number of people and may be freely moved from one computer
location to another, so long as there is no possibility of it
being used at one location while it's being used at another.
Just as a book cannot be read by two different persons at the
same time.
Commercial users of EZSET must register and pay for their
copies of EZSET within 30 days of first use or their license
is withdrawn. Site-License arrangements may be made by
contacting McAdams Associates.
Anyone distributing EZSET for any kind of remuneration must
first contact McAdams Associates at the address below for
authorization. This authorization will be automatically granted
to distributors recognized by the ASP as adhering to its
guidelines for shareware distributors, and such distributors may
begin offering EZSET immediately (However McAdams Associates must
still be advised so that the distributor can be kept up-to-date
with the latest version of EZSET.).
You are encouraged to pass a copy of EZSET along to your
friends for evaluation. Please encourage them to register their
8
copy if they find that they can use it.
Since this is shareware and I am a member of the Association of
Shareware Professionals, please read the following:
"This program is produced by a member of the
Association of Shareware Professionals (ASP). ASP
wants to make sure that the shareware principle works
for you. If you are unable to resolve a shareware-
related problem with an ASP member by contacting the
member directly, ASP may be able to help. The ASP
Ombudsman can help you resolve a dispute or problem
with an ASP member, but does not provide technical
support for members' products. Please write to the ASP
Ombudsman at 545 Grover Road, Muskegon, MI 49442
or send a CompuServe message via CompuServe Mail to ASP
Ombudsman 70007,3536."
REGISTERING EZSET
-----------------
Registering EZSET costs $20 and includes one year's free support
by phone, mail and CompuServe e-mail, free bug fixes, the latest
version of EZSET, plus TWO handy utility programs: 1) SEARCH, a
multitalented disk scanning file-finder program, and 2) TO/RET, a
"two-in-one" combo that work together, enabling you to change to
any disk/directory and return instantly to your starting point.
To register EZSET, simply print and fill out the file
REGISTER.DOC and send it, along with $20 (checks or M.O.s drawn
on a U.S. bank only, please) to:
McAdams Associates
P.O. Box 835505
Richardson, TX 75083-5505
CIS PPN 70353,1644
-----------------------------------------------------------------
EZSET was created using QuickBasic, QuickC and MASM, which are
trademarks of Microsoft Corporation.
Credit to Mr. Bryan Walker, who explained how to obtain return
codes from QuickBasic, in the May, 1990 PC Resource magazine.
9
INDEX
-----
[-><-] arrow keys, 5-6
Batch files, 3
Byte editing screen, 5-6
Changing online value
default or overall, 5
for individual strings, 4
Changing port setting
default or overall, 5
for individual strings, 4
[DEL] delete key
for erasing an entire string, 4
for erasing a single byte, 6
Editing a string, 3, 4
[END] key, 6
Entering a new string, 3, 5
ERRORLEVEL return code, 3
Escape codes (producing), 6
[ESC] escape key, 5, 6, 7
Exiting EZSET, 3
Hardware requirements, 2
[HOME] key, 6
[INS] insert key, 6
Library file, 2, 3, 4
Light bar menus, 2, 4, 5
Limitations, 2
Main menu, 2-3
Maximum length of strings, 2
Maximum number of strings, 2
Online return code, see Printer return code
[PgDn] page down key, 6
[PgUp] page up key, 6
Printer ports, 2, 3
default or overall, 5
for individual strings, 4
Printer return code, 2, 3, 4
Registering EZSET, 9
Scrolling menus, see Light bar menus
Starting EZSET
in command line mode, 3
in editor mode, 2
Troubleshooting, 7-8
10